package com.ruoyi.system.api.factory;


import com.ruoyi.common.core.domain.R;

import com.ruoyi.system.api.RemoteAAgencyFundService;
import com.ruoyi.system.api.domain.AAgencyFund;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;


import org.springframework.stereotype.Component;

@Component
public class RemoteAAgencyFundServiceFactory implements FallbackFactory<RemoteAAgencyFundService> {
    @Override
    public RemoteAAgencyFundService create(Throwable throwable) {
        return new RemoteAAgencyFundService() {
            @Override
            public R<Page<AAgencyFund>> queryByPage(AAgencyFund aAgencyFund, PageRequest pageRequest) {
                return R.fail("服务降级");
            }

            @Override
            public R<AAgencyFund> queryById(Integer id) {

                return R.fail("服务降级");
            }

            @Override
            public R<AAgencyFund> add(AAgencyFund aAgencyFund) {
                return R.fail("服务降级");
            }

            @Override
            public R<AAgencyFund> edit(AAgencyFund aAgencyFund) {
                return R.fail("服务降级");
            }

            @Override
            public R<Boolean> deleteById(Integer id) {
                return R.fail("服务降级");
            }

            @Override
            public R<AAgencyFund> updateStatus(AAgencyFund aAgencyFund) {
                return R.fail("服务降级");
            }
        };
    }
}
